﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">

	<Style x:Key="TbUsername" TargetType="{x:Type TextBox}">
		<Setter Property="Foreground" Value="#C3C3C3"/>
		<Setter Property="FontFamily" Value="Microsoft YaHei"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Text" Value="用户名"/>
		<Setter Property="Height" Value="30"/>
		<Setter Property="Width" Value="120"/>
		<Setter Property="Margin" Value="7"/>
		<Setter Property="Template">
			<Setter.Value>
				<!--设置样式 -->
				<ControlTemplate TargetType="{x:Type TextBox}">
					<Microsoft_Windows_Themes:ListBoxChrome x:Name="UsernameTextBox" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" SnapsToDevicePixels="True">
						<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
					</Microsoft_Windows_Themes:ListBoxChrome>
					<!-- 设置鼠标移到关闭按钮上的效果 -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="BorderBrush" TargetName="UsernameTextBox" Value="#6699FF"/>
							<Setter Property="BorderThickness" TargetName="UsernameTextBox" Value="1.5"/>
							<Setter Property="Background" TargetName="UsernameTextBox" Value="#3D3D3D"/>
						</Trigger>
						<Trigger Property="IsFocused" Value="True">
							<Setter Property="Background" TargetName="UsernameTextBox" Value="Black"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="true">
							<Setter Property="BorderBrush" TargetName="UsernameTextBox" Value="White"/>
							<Setter Property="Background" TargetName="UsernameTextBox" Value="White"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Foreground" Value="White"/>
		<Setter Property="FontFamily" Value="Segoe UI"/>
		<Setter Property="FontSize" Value="16"/>
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Height" Value="40"/>
		<Setter Property="Width" Value="100"/>
		<Setter Property="Margin" Value="10"/>
		<Setter Property="Template">
			<Setter.Value>
				<!--设置样式 -->
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Rectangle x:Name="Rectangle" Stroke="White" StrokeThickness="2" RadiusX="5" RadiusY="5" Fill="Transparent"/>
						<ContentPresenter x:Name="ContentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
					</Grid>
					<!-- 设置鼠标移到关闭按钮上的效果 -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Foreground" Value="#CCCCCC"/>
							<Setter Property="Stroke" TargetName="Rectangle" Value="#CCCCCC"/>
							<Setter Property="Fill" TargetName="Rectangle" Value="#3D3D3D"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Foreground" Value="Black"/>
							<Setter Property="Stroke" TargetName="Rectangle" Value="White"/>
							<Setter Property="Fill" TargetName="Rectangle" Value="White"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<!--设置样式 -->
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Ellipse x:Name="Ellipse" Stroke="White" Fill="{Binding Source=window.Background}"/>
						<Line x:Name="line1" Stroke="White" X1="4" Y1="4" X2="11" Y2="11"/>
						<Line x:Name="line2" Stroke="White" X1="4" Y1="11" X2="11" Y2="4"/>
						<ContentPresenter x:Name="ContentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
					</Grid>
					<!-- 设置鼠标移到关闭按钮上的效果 -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="line1" Value="#CCCCCC"/>
							<Setter Property="Stroke" TargetName="line2" Value="#CCCCCC"/>
							<Setter Property="Stroke" TargetName="Ellipse" Value="#CCCCCC"/>
							<Setter Property="Fill" TargetName="Ellipse" Value="#3D3D3D"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="line1" Value="Black"/>
							<Setter Property="Stroke" TargetName="line2" Value="Black"/>
							<Setter Property="Stroke" TargetName="Ellipse" Value="White"/>
							<Setter Property="Fill" TargetName="Ellipse" Value="White"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="MiniButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<!--设置样式 -->
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Ellipse x:Name="Ellipse" Stroke="White" Fill="{Binding Source=window.Background}"/>
						<Line x:Name="line1" Stroke="White" StrokeThickness="2" X1="4" Y1="7" X2="11" Y2="7"/>
						<ContentPresenter x:Name="ContentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
					</Grid>
					<!-- 设置鼠标移到关闭按钮上的效果 -->
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="true">
							<Setter Property="Stroke" TargetName="line1" Value="#CCCCCC"/>
							<Setter Property="Stroke" TargetName="Ellipse" Value="#CCCCCC"/>
							<Setter Property="Fill" TargetName="Ellipse" Value="#3D3D3D"/>
						</Trigger>
						<Trigger Property="IsPressed" Value="true">
							<Setter Property="Stroke" TargetName="line1" Value="Black"/>
							<Setter Property="Stroke" TargetName="Ellipse" Value="White"/>
							<Setter Property="Fill" TargetName="Ellipse" Value="White"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="TbPassword" TargetType="{x:Type PasswordBox}">
		<Setter Property="Foreground" Value="Black"/>
		<Setter Property="FontFamily" Value="Segoe UI"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="PasswordChar" Value="*"/>
		<Setter Property="Height" Value="30"/>
		<Setter Property="Width" Value="120"/>
		<Setter Property="Margin" Value="7"/>
		<Setter Property="FontSize" Value="20"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate  TargetType="{x:Type PasswordBox}">
					<Microsoft_Windows_Themes:ListBoxChrome x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" SnapsToDevicePixels="True">
						<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
					</Microsoft_Windows_Themes:ListBoxChrome>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>